﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace MagicFight
{
    public class HolyPower : Magic
    {
        public float multiplier = Def.HolyPowerDef.Multiplier;
        int duration = Def.HolyPowerDef.Duration;

        public HolyPower(Character caster)
            : base(caster, Def.HolyPowerDef.N)
        {
        }

        public override void Effect(GameTime gameTime)
        {
            // O efeito desta magia está em Character.TakeDamage()
            if (!alive || lifeTime > duration) { alive = false; return; }
            if (lifeTime == 0)
            {
                ps.effectsManager.Add(new HolyAura(this));
                foreach (Magic m in ps.magics)
                    if (m is HolyPower && m != this && m.caster == this.caster) m.alive = false;
            }
        }
    }
}
